package com.springweb.unit3.scope;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.web.context.WebApplicationContext;

import com.springweb.unit3.scope.impl.ShoppingCart;

@Configuration
public class CartConfig {
	@Bean
	@Scope(value=WebApplicationContext.SCOPE_SESSION, proxyMode=ScopedProxyMode.INTERFACES)
	public Cart shoppingCart() {
		return new ShoppingCart();
	}
}
